import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'

Vue.use(VueRouter)

  const routes = [
  // {path: '/users/index', component: require('../views/users/Index').default},
	//   {path: '/users/discount', component: require('../views/users/Discount').default},
	//   {path: '/users/hot', component: require('../views/users/Hot').default},
	//   {path: '/users/heima', component: require('../views/users/Heima').default},
	//   {path: '/users/nearby', component: require('../views/users/Neardy').default},
	//   {path: '/users/circle', component: require('../views/users/Circle').default},
	//   {path: '/users/logon', component: require('../views/users/Logon').default},
	//   {path: '/users/rank', component: require('../views/users/Rank').default},
	//   {path: '/users/collection', component: require('../views/users/Collection').default},
	//   {path: '/users/account', component: require('../views/users/Account').default},
	//   {path: '/users/order', component: require('../views/users/Order').default},
	//   {path: '/users/shoping', component: require('../views/users/Shoping').default},
	  {path: '/', component: require('../views/users/Login').default},
	  {path: '/backstage/', component: require('../views/Backstage/BackstageIndex').default},
	  {path: '/backstage/details', component: require('../views/Backstage/BackstageDetails').default},
	  {path: '/backstage/leaseGroup', component: require('../views/Backstage/BackstageLeaseGroup').default},
	  {path: '/backstage/goods', component: require('../views/Backstage/BackstageGoods').default},
	  {path: '/backstage/order', component: require('../views/Backstage/BackstageOrder').default},
	  {path: '/backstage/add', component: require('../views/Backstage/AddGoods').default},
	  {path: '/backstage/discount', component: require('../views/Backstage/BackstageDiscount').default},
	  {path: '/backstage/merchant', component: require('../views/Backstage/MerchantDetails').default},
	  {path: '/backstage/headimg', component: require('../views/Backstage/HeadImg').default},
	  {path: '/admin', component: require('../views/Admin/AdminLogin').default},
	  {path: '/admin/home', component: require('../views/Admin/AdminHome').default, children: [
		{path: '/', component: require('../views/Admin/AdminIndex').default},
			  {path: 'backstage', component: require('../views/Admin/AdminBackstage').default},
			  {path: 'user', component: require('../views/Admin/AdminUser').default},
			  {path: '/confirm',component:require('../views/Admin/AdminConfirm').default}
    ]},
]

const router = new VueRouter({
  routes
})

export default router
